package com.tq.teaching_quality.controller;


import com.tq.teaching_quality.entity.SurveyQuestionNextQuestion;
import com.tq.teaching_quality.service.SurveyQuestionNextQuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 问卷题侯选项目 前端控制器
 * </p>
 *
 * @author YTH
 * @since 2020-06-29
 */
@RestController
@RequestMapping("/survey-question-next-question")
public class SurveyQuestionNextQuestionController {

    @Autowired
    private SurveyQuestionNextQuestionService SurveyQuestionNextQuestionService;

    //增加一条记录
    @RequestMapping("/AddSurveyQuestionNextQuestion")
    public boolean AddSurveyQuestionNextQuestion(@PathVariable("SurveyQuestionNextQuestion") SurveyQuestionNextQuestion SurveyQuestionNextQuestion){
        return SurveyQuestionNextQuestionService.save(SurveyQuestionNextQuestion);
    }

    //删除一条记录
    @RequestMapping("/DeleteSurveyQuestionNextQuestion")
    public boolean DeleteSurveyQuestionNextQuestion(@PathVariable("SurveyQuestionNextQuestionId") Long SurveyQuestionNextQuestionId){
        return SurveyQuestionNextQuestionService.removeById(SurveyQuestionNextQuestionId);
    }

    //查询全部记录
    @RequestMapping("/SelectAllSurveyQuestionNextQuestion")
    public List<SurveyQuestionNextQuestion> SelectAllSurveyQuestionNextQuestion(){
        return SurveyQuestionNextQuestionService.list();
    }

    //修改一条记录
    @RequestMapping("/UpdateSurveyQuestionNextQuestion")
    public boolean UpdateSurveyQuestionNextQuestion(@PathVariable("SurveyQuestionNextQuestion") SurveyQuestionNextQuestion SurveyQuestionNextQuestion){
        return SurveyQuestionNextQuestionService.updateById(SurveyQuestionNextQuestion);
    }

}

